﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace LibFriesland_Campina_CRM
{
    public class BizWareHousing
    {
        #region Thuoc tinh
        public string warehousing_charid { get; set; }
        public DateTime datetime_warehousing { get { return Convert.ToDateTime(Thuvien.myConvertStringToLongDate(datetime_warehousing_str)); } }
        public string datetime_warehousing_str { get; set; }
        public DateTime datetime_phone_warehousing { get { return Convert.ToDateTime(Thuvien.myConvertStringToLongDate(datetime_phone_warehousing_str)); } }
        public string datetime_phone_warehousing_str { get; set; }
        public string by_na { get; set; }
        public string by_shop { get; set; }
        #endregion

        #region Ham thiet lap
        public BizWareHousing() { }
        public BizWareHousing(string pWarehousing_charid, string pDatetime_warehousing_str, string pDatetime_phone_warehousing_str, string pBy_na, string pBy_shop)
        {
            warehousing_charid = pWarehousing_charid;
            datetime_warehousing_str = pDatetime_warehousing_str;
            datetime_phone_warehousing_str = pDatetime_phone_warehousing_str;
            by_na = pBy_na;
            by_shop = pBy_shop;
        }
        #endregion

        #region Phuong thuc
        //Them phieu nhap kho
        public int addWareHousing()
        {
            return DalWareHousing.addWareHousing(this);
        }

        //Webservice
        //Them phieu nhap kho boi NA
        public static int addWareHousingbyNA(BizWareHousing pWareHousing, BizWareHousingDetail pWareHousingDetail)
        {
            return DalWareHousing.addWareHousingbyBA(pWareHousing, pWareHousingDetail);
        }
        #endregion
    }
}
